package com.qf.dao.blog.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.qf.api.blog.entity.WikiEntity;
import com.qf.api.front.vo.WikiVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
* @author sin
* @description 针对表【t_wiki(知识库表)】的数据库操作Mapper
* @createDate 2025-05-23 13:27:40
* @Entity com.qf.api.entity.TWiki
*/
@Mapper
public interface WikiMapper extends BaseMapper<WikiEntity> {

    @Update("UPDATE t_wiki SET is_top = #{value} WHERE id = #{WikiId}")
    int updateWikiTop(@Param("WikiId") Long WikiId, @Param("value") Integer value);

    @Update("UPDATE t_wiki SET is_publish = #{value} WHERE id = #{WikiId}")
    int updateWikiPublish(@Param("WikiId") Long WikiId, @Param("value") Integer value);

    List<WikiVO> getWikiPage(String title);
}




